package entidades;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
/**
 * @author Eli Moura
 *
 */
@Entity
@NamedQueries({
    @NamedQuery(name="findUsuarioById", query="SELECT u FROM Usuario u WHERE u.id = :id"),
    @NamedQuery(name="findUsuarioByNome", query="SELECT u FROM Usuario u WHERE u.nome = :nome"),
        @NamedQuery(name="findUsuarios", query="SELECT u FROM Usuario u ORDER BY u.id")
})
public class Usuario implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -5776046952051756559L;
	private String matricula, nome, cpf, email, telefone;
	private long id;
	
	@Id
    @GeneratedValue(strategy=GenerationType.AUTO)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getMatricula() {
		return matricula;
	}

	public void setMatricula(String matricula) {
		this.matricula = matricula;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getCpf() {
		return cpf;
	}

	public void setCpf(String cpf) {
		this.cpf = cpf;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTelefone() {
		return telefone;
	}

	public void setTelefone(String telefone) {
		this.telefone = telefone;
	}

	/**
     * Default constructor. 
     */
    public Usuario() {
        // TODO 
    }

}
